namespace SS.WPF.Framework.Preference
{
    using System.Collections.Generic;

    /// <summary>
    /// The interface that is used to provide functions for storing preference keys
    /// </summary>
    public interface IPreferenceStore
    {
        /// <summary>
        /// The key to be stored
        /// </summary>
        string Key { get; set; }

        T GetValue<T>(string key);
        
        T GetValue<T>(string key, T defaultValue);

        /// <summary>
        /// Store key and it's value into list for reusing
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="key"></param>
        /// <param name="value"></param>
        void SetValue<T>(string key, T value);

        /// <summary>
        /// Clear all key
        /// </summary>
        void Clear();

        /// <summary>
        /// Get all of key value has been stored before
        /// </summary>
        /// <returns></returns>
        IEnumerable<object> GetAllValues();
    }
}